home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / cgrphxdv.lha / CGraphX / C / slib / CGFX_lib.c next >
C/C++ Source or Header  |  1995-12-10  |  549b  |  36 lines

  1.  
  2. #ifdef __SASC_650
  3.  
  4. #include <constructor.h>
  5. #include <proto/exec.h> 
  6.  
  7. void __regargs __autoopenfail(char *);
  8.  
  9. extern LONG __CGFXlibversion;
  10.  
  11. struct Library *CyberGfxBase;
  12. static struct Library *LibBase;
  13.  
  14. CBMLIB_CONSTRUCTOR(OpenCGFX)
  15.  
  16. {
  17.  if (CyberGfxBase=LibBase=OpenLibrary("cybergraphics.library",__CGFXlibversion)) return 0;
  18.  
  19.  __autoopenfail("cybergraphics.library");
  20.  return 1;
  21. }
  22.  
  23. CBMLIB_DESTRUCTOR(CloseCGFX)
  24.  
  25. {
  26.  if (LibBase)
  27.   {
  28.    CloseLibrary (LibBase);
  29.    LibBase=CyberGfxBase=NULL;
  30.   }
  31. }
  32.  
  33. #else
  34. #error SAS/C 6.50 or newer required.
  35. #endif
  36.